package com.ozonetel.main;

import com.ozonetel.util.PhoneNumberFormatter;
import java.io.Serializable;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

/**
 * @author <a href="mailto:sudhakargupta.s@gmail.com">SudhakarGupta</a>
 */
public class MainClass implements Serializable {

    public MainClass() {
    }

    public static void main(String[] s) {
        JSONArray jsonArray = new JSONArray();
        if (s != null && s.length > 0 && s.length < 2) {
            String[] numbers = s[0].split(",");
            for (String number : numbers) {
                JSONObject jsonObject = PhoneNumberFormatter.jsonInfo(number);
                jsonObject.put("inputNumber", number);
                jsonArray.add(jsonObject);
            }
        }

        System.out.println(jsonArray.toString(1));

//        System.out.println(PhoneNumberFormatter.info("914843980533"));
//        System.out.println(PhoneNumberFormatter.info("00919985718693"));
//        System.out.println(PhoneNumberFormatter.info("+9104030952095"));
//        System.out.println(PhoneNumberFormatter.info("00919985718693"));
//        System.out.println(PhoneNumberFormatter.info("00911242298100"));
//        System.out.println(PhoneNumberFormatter.jsonInfo("914843980533").toString(1));
//        System.out.println(PhoneNumberFormatter.jsonInfo("00919985718693").toString(1));
//        System.out.println(PhoneNumberFormatter.jsonInfo("+9104030952095").toString(1));
//        System.out.println(PhoneNumberFormatter.jsonInfo("00919985718693").toString(1));
//        System.out.println(PhoneNumberFormatter.jsonInfo("00911242298100").toString(1));
//        System.out.println(PhoneNumberFormatter.jsonInfo("0014042138046").toString(1));
//        System.out.println(PhoneNumberFormatter.jsonInfo("04066563655").toString(1));
//        System.out.println(PhoneNumberFormatter.jsonInfo("18002666").toString(1));
    }
}